
//
//  DepartmentViewController.m
//  WarnDemo
//
//  Created by TuRing on 16/10/11.
//  Copyright © 2016年 You Ran. All rights reserved.
//

#import "DepartmentViewController.h"

@interface DepartmentViewController ()<UITableViewDataSource, UITableViewDelegate>

@end

@implementation DepartmentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"应急预案";
    /** 改变navigation title的文本颜色*/
    NSDictionary *dic = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
    self.navigationController.navigationBar.titleTextAttributes =dic;
    
    
    /** 更改返回按钮及文本颜色 **/
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
    /** 去掉返回按钮旁边的提示文本 **/
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
                                                         forBarMetrics:UIBarMetricsDefault];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:10/255.0 green:158/255.0 blue:254/255.0 alpha:1.0]];

    // Do any additional setup after loading the view.
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 3;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    if (indexPath.row == 0) {
        cell.textLabel.text = @"财务部";
    } else if (indexPath.row == 1) {
        cell.textLabel.text = @"应急部门";
    } else if (indexPath.row == 2) {
        cell.textLabel.text = @"交通物流部";
    }
    
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
